﻿@using LunchList.ViewModels
@model GuestListsViewModel

@*UpdateTargetId="GuestList",InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace,*@
@{
var count = 1; 
}
@foreach (GuestListViewModel guestEvents in Model.GuestLists)
{
    var targetId = "GuestList" + count.ToString(); 
    using (Ajax.BeginForm("ModifyGuestList", "Home", new AjaxOptions { UpdateTargetId = targetId, InsertionMode = InsertionMode.Replace, HttpMethod = "POST" }))
    {
        <div class="container" id="@targetId">
            @{Html.RenderPartial("_GuestList", guestEvents);}
        </div>
    }
    count++;
}

